﻿<sap:ActivityDesigner x:Class="Active.Activities.ActivityDesigners.MSDeployDesigner"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:local="clr-namespace:Active.Activities.ActivityDesigners.Converters"
		xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
		xmlns:sapc="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation"
		xmlns:sapv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Loaded="ActivityDesigner_Loaded" Width="Auto" Height="Auto">
	<sap:ActivityDesigner.Icon>
		<DrawingBrush>
			<DrawingBrush.Drawing>
				<ImageDrawing>
					<ImageDrawing.Rect>
						<Rect Location="0,0" Size="16,16" ></Rect>
					</ImageDrawing.Rect>
					<ImageDrawing.ImageSource>
						<BitmapImage UriSource="/Active.Activities;component/Resources/MSDeploy.png"></BitmapImage>
					</ImageDrawing.ImageSource>
				</ImageDrawing>
			</DrawingBrush.Drawing>
		</DrawingBrush>
	</sap:ActivityDesigner.Icon>
	<sap:ActivityDesigner.Resources>
		<ResourceDictionary>
			<sapc:ArgumentToExpressionConverter x:Key="ArgumentToExpressionConverter" />
			<local:InArgumentBoolConverter x:Key="InArgumentBoolConverter" />
		</ResourceDictionary>
	</sap:ActivityDesigner.Resources>
	<Grid Width="600" VerticalAlignment="Top" HorizontalAlignment="Left">
		<Grid.RowDefinitions>
			<RowDefinition Height="38" />
			<RowDefinition Height="38" />
			<RowDefinition Height="38" />
			<RowDefinition Height="36" />
			<RowDefinition Height="70" Name="CmdSettings" />
			<RowDefinition Height="70" Name="ExeSettings" />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="515" />
			<ColumnDefinition Width="85*" />
		</Grid.ColumnDefinitions>
		<ComboBox Height="23" HorizontalAlignment="Left" Margin="140,8,0,0" Name="cmbVersion" VerticalAlignment="Top" Width="65" SelectionChanged="cmbVersion_SelectionChanged">
			<ComboBoxItem Content="1" />
			<ComboBoxItem Content="2" />
			<ComboBoxItem Content="3" />
		</ComboBox>
		<Image Height="16" HorizontalAlignment="Left" Margin="208,12,0,0" Name="imgVersionHelp" Stretch="Fill" VerticalAlignment="Top" Width="16" Source="/Active.Activities;component/Resources/Help.png" MouseEnter="imgVersionHelp_MouseEnter" MouseLeave="imgVersionHelp_MouseLeave" />
		<Popup Name="VersionHelp" IsOpen="False">
			<Border BorderBrush="Black" BorderThickness="1">
				<Grid Margin="0,0,0,0" Name="VersionHelpContent">
					<Grid.RowDefinitions>
						<RowDefinition Height="*" />
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="*" />
					</Grid.ColumnDefinitions>
					<Label Name="lblVersionHelp"></Label>
				</Grid>
			</Border>
		</Popup>
		<RadioButton Content="Use .Cmd file" Height="16" HorizontalAlignment="Right" Margin="0,12,197,0" Name="rdoCmd" VerticalAlignment="Top" Checked="rdoCmd_Checked" />
		<RadioButton Content="Use .Exe file" Height="16" HorizontalAlignment="Right" Margin="0,12,90,0" Name="rdoExe" VerticalAlignment="Top" Checked="rdoExe_Checked" />
		<Label Content="IISWebApplication :" Height="28" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Top" Grid.Row="1" />
		<sapv:ExpressionTextBox 
			HintText="site.com/{virtualpath}" 
			Expression="{Binding Path=ModelItem.IISWebApplication, Mode=TwoWay, Converter={StaticResource ResourceKey=ArgumentToExpressionConverter}}" 
			OwnerActivity="{Binding Path=ModelItem}"
			VerticalAlignment="Top" Margin="140,5,5,0" Grid.Row="1" Height="26" Width="370" HorizontalAlignment="Stretch"></sapv:ExpressionTextBox>
		<Label Content="Additional Params :" Height="28" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Top" Grid.Row="2" />
		<sapv:ExpressionTextBox 
			HintText="http://technet.microsoft.com/en-us/library/dd568991(v=ws.10).aspx" 
			Expression="{Binding Path=ModelItem.CommandLineParams, Mode=TwoWay, Converter={StaticResource ResourceKey=ArgumentToExpressionConverter}}" 
			OwnerActivity="{Binding Path=ModelItem}"
			Margin="140,5,5,0" 
			VerticalAlignment="Top" Grid.Row="2" Height="26" Width="370" HorizontalAlignment="Stretch"></sapv:ExpressionTextBox>
		<CheckBox Content="Do Not Delete Existing Files" Height="16" HorizontalAlignment="Left" IsChecked="{Binding Path=ModelItem.DoNotDeleteFiles, Mode=TwoWay, Converter={StaticResource InArgumentBoolConverter}}" IsThreeState="False" Margin="10,10,0,0" Name="chkDoNotDeleteFiles" VerticalAlignment="Top" Grid.Row="3" />
		<CheckBox Content="Allow Untrusted SSL Connection" Height="16" HorizontalAlignment="Left" IsChecked="{Binding Path=ModelItem.AllowUntrustedSSLConnection, Mode=TwoWay, Converter={StaticResource InArgumentBoolConverter}}" IsThreeState="False" Margin="200,10,0,0" Name="chkAllowUntrusted" VerticalAlignment="Top" Grid.Row="3" />
		<CheckBox Content="Test" Height="16" HorizontalAlignment="Left" IsChecked="{Binding Path=ModelItem.Test, Mode=TwoWay, Converter={StaticResource InArgumentBoolConverter}}" IsThreeState="False" Margin="420,10,0,0" Name="chkTest" VerticalAlignment="Top" Grid.Row="3" />
		<Button Content="..." Height="26" HorizontalAlignment="Left" Margin="10,5,0,0" Name="btnSelectIISApplication" VerticalAlignment="Top" Width="28" Grid.Column="1" Grid.Row="1" Click="btnSelectIISApplication_Click" />
		<Grid Grid.ColumnSpan="2" Margin="0,0,0,0" Grid.Row="4" Width="600">
			<Grid.RowDefinitions>
				<RowDefinition Height="*" />
				<RowDefinition Height="*" />
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="515" />
				<ColumnDefinition Width="85*" />
			</Grid.ColumnDefinitions>
			<Label Content="CmdFilename :" Height="28" VerticalAlignment="Top" HorizontalAlignment="Left"  Margin="5,5,0,0" />
			<sapv:ExpressionTextBox Expression="{Binding Path=ModelItem.CmdFileName, Mode=TwoWay, Converter={StaticResource ArgumentToExpressionConverter}}" HintText="Generated cmd file name" HorizontalAlignment="Stretch" Margin="140,0,5,0" OwnerActivity="{Binding Path=ModelItem}" Height="26" Width="370" Grid.Row="0" Name="txtCmdFileName" />
			<Button Content="..." Grid.Column="1" Height="23" HorizontalAlignment="Left" Margin="10,5,0,0" Name="btnPickCmdFile" VerticalAlignment="Top" Width="28" Click="btnPickCmdFile_Click" />
			<Button Content="Rel" ToolTip="Convert To Relative Path" Height="23" HorizontalAlignment="Left" Name="btnConvertCmdPathToRelative" VerticalAlignment="Top" Width="28" Grid.Column="1" Grid.Row="0"  Margin="42,5,0,0" Click="btnConvertCmdPathToRelative_Click" />
			<CheckBox Content="Use Version 2.x (overrides version - obsolete, only for legacy workflows)" Height="16" HorizontalAlignment="Left" Margin="10,10,0,0" Name="chkUserVersion2X" VerticalAlignment="Top" Grid.Row="1" IsThreeState="False" IsChecked="{Binding Path=ModelItem.UseVersion2x, Mode=TwoWay, Converter={StaticResource InArgumentBoolConverter}}" Checked="chkUserVersion2X_Checked" />
		</Grid>
		<Label Content="MSDeploy Version :" Height="28" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Top" />
		<Grid Grid.ColumnSpan="2" Margin="0,0,0,0" Grid.Row="5" Width="600">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="515" />
				<ColumnDefinition Width="85*" />
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="*" />
				<RowDefinition Height="*" />
			</Grid.RowDefinitions>
			<Label Content="ZipFilename :" Height="28" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Top" />
			<sapv:ExpressionTextBox Expression="{Binding Path=ModelItem.ZipPackageFilename, Mode=TwoWay, Converter={StaticResource ArgumentToExpressionConverter}}" HintText="Generated zip file name" HorizontalAlignment="Stretch" Margin="140,0,5,0" OwnerActivity="{Binding Path=ModelItem}" Height="26" Grid.Row="0" Width="370" Name="txtZipFileName" />
			<Button Content="..." Grid.Column="1" Height="23" HorizontalAlignment="Left" Margin="10,5,0,0" Name="btnSelectZipFileName" VerticalAlignment="Top" Width="28" Click="btnSelectZipFileName_Click" />
			<Button Content="Rel" ToolTip="Convert To Relative Path" Height="23" HorizontalAlignment="Left" Name="btnConvertZipPathToRelative" VerticalAlignment="Top" Width="28" Grid.Column="1" Margin="42,5,0,0" Click="btnConvertZipPathToRelative_Click" />
			<Label Content="ParamFilename :" Height="28" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Top" Grid.Row="1" />
			<sapv:ExpressionTextBox Expression="{Binding Path=ModelItem.ParamFilename, Mode=TwoWay, Converter={StaticResource ArgumentToExpressionConverter}}" HintText="Generated params xml file name" HorizontalAlignment="Stretch" Margin="140,0,5,0" OwnerActivity="{Binding Path=ModelItem}" Height="26" Grid.Row="1" Width="370" Name="txtParamsFileName" />
			<Button Content="..." Grid.Column="1" Height="23" HorizontalAlignment="Left" Margin="10,5,0,0" Name="btnSelectParamFileName" VerticalAlignment="Top" Width="28" Grid.Row="1" Click="btnSelectParamFileName_Click" />
			<Button Content="Rel" ToolTip="Convert To Relative Path" Height="23" HorizontalAlignment="Left" Name="btnConvertParamsPathToRelative" VerticalAlignment="Top" Width="28" Grid.Column="1" Grid.Row="2" Margin="42,5,0,0" Click="btnConvertParamsPathToRelative_Click" />
		</Grid>
	</Grid>
</sap:ActivityDesigner>
